package com.allwees.bs.module.core.wf.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.allwees.bs.core.model.util.PhotosStr;
import com.allwees.bs.core.modelbase.entity.BaseEntity;
import com.allwees.core.common.constant.EStatus;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;

/**
 * 工作流变迁记录
 *
 * @author yangylsky
 * @since 2019-12-12
 *
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("wf_workflow_log")
public final class WorkflowLog extends BaseEntity implements PhotosStr {
	@Column(insertable = false, updatable = false, length = 48)
	private String workflowUuid;

	/**
	 * 操作员uuid
	 */
	@Column(length = 48)
	private String operatorUuid;

	/**
	 * 本次操作
	 */
	@Column(length = 48)
	private String wfAction;

	/**
	 * 上一个状态
	 */
	@Column(length = 48)
	private String wfBackState;

	/**
	 * 当前状态
	 */
	@Column(length = 48)
	private String wfState;

	/**
	 * 执行Action后Bs对象的status
	 */
	private EStatus afterActionStatus;

	@Column(length = 48)
	private String reason;

	private String remark;

	@JsonIgnore
    @JSONField(serialize = false, deserialize = false)
    @Column(length = 4096)
    private String photosStr;
}
